package htlgkr.nodlehs;

public class DBUnitTbl implements DBUnitColumns {
	public static final String TABLE_NAME = "units";
	public static final String SQL_DROP = "DROP TABLE IF EXISTS units";
	public static final String SQL_DEL = "DELETE units";
	public static final String[] ALL_COLUMNS = new String[] { uni_ID + " AS _id", uni_begin, uni_end, uni_color, uni_roo_ID, uni_tea_ID, uni_sub_ID};
	public static final String SQL_CREATE = "CREATE TABLE units ( " +
			"uni_ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, " +
			"uni_begin TEXT NOT NULL," +
			"uni_end TEXT NOT NULL, " +
			"uni_color TEXT NOT NULL, " +
			"uni_roo_ID INTEGER, " +
			"uni_tea_ID INTEGER, " +
			"uni_sub_ID INTEGER, " +
			"FOREIGN KEY(uni_roo_ID) REFERENCES rooms(roo_ID), " +
			"FOREIGN KEY(uni_tea_ID) REFERENCES teachers(tea_ID), " +
			"FOREIGN KEY(uni_sub_ID) REFERENCES subjects(sub_ID))";
	public static final String SQL_INSERT = "INSERT INTO units ( uni_begin, uni_end, uni_color, uni_roo_ID, uni_tea_ID, uni_sub_ID) VALUES(?,?,?,?,?,?)";
}
